<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <p>{{name}}</p>
        <p k-text="name"></p>
        <p>{{age}}</p>
        <p>{{doubleAge}} </p> 
        <input type="text" k-model="name">
        <button @click="changeName">呵呵</button>
        <div k-html="html"></div>
    </div>
    <script src='./compile.js'></script>
    <script src='./kvue.js'></script>
    <script> 
        let kaikeba = new KVue({
            el: '#app',
            data: { 
                name: "I am test.",
                age: 12, 
                html: '<button>这是一个按钮</button>' 
            }, 
            created() {
                console.log('开始啦') 
                setTimeout(() => { 
                    this.name = '我是蜗牛' 
                }, 1500) 
            }, 
            methods: {
                changeName() {
                    this.name = '哈喽，开课吧'
                    this.age = 1 
                    this.id = 'xx' 
                    console.log(1, this) 
                } 
            } 
        }) 
    </script>
</body>

</html>